﻿//----------------------------------------------------------------------------
//Azriel Rogue Honorbuddy CR:
//Created by: Azriel
//$Rev$
//Date: $Date$
//
//----------------------------------------------------------------------------
using CommonBehaviors.Actions;
using Styx;
using Styx.Common;
using Styx.CommonBot.Routines;
using Styx.TreeSharp;
using Styx.WoWInternals.WoWObjects;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media;

#region [Method] - Class Redundancy
using HKM = SinisterD.Core.Managers.Hotkey_Manager;
using R = SinisterD.Rotation.Rotation;
using U = SinisterD.Core.Unit;
using TM = SinisterD.Core.Managers.Talent_Manager;
using L = SinisterD.Core.Utilities.Log;
using SB = SinisterD.Core.Helpers.Spell_Book;
using S = SinisterD.Core.Spell;

#endregion  
namespace AzRogue
{

    public class Main : CombatRoutine
    {


        private static readonly Version version = new Version(1, 0, 4);
        public override string Name { get { return "Azriel Rogue CR BETA " + version; } }
        public override WoWClass Class { get { return WoWClass.Rogue; } }
        private static LocalPlayer Me { get { return StyxWoW.Me; } }

        
        #region [Method] - Implementations

        public override Composite PreCombatBuffBehavior { get { return new ActionRunCoroutine(ctx => R.preCombatBuffing()); } }
        public override Composite CombatBuffBehavior { get { return new ActionRunCoroutine(ctx => R.combatBuffing()); } }
        public override Composite CombatBehavior { get { return new ActionRunCoroutine(ctx => R.combatRotation2()); } }

        #region [Method] - Hidden Overrides
        public override void Initialize()
        {
            Logging.Write(Colors.OrangeRed, "Hello <Valued User>!");
            Logging.Write(Colors.White, "");
            Logging.Write(Colors.OrangeRed, "Current Version:");
            Logging.Write(Colors.OrangeRed, "-- Azrielv" + version + " --");
            Logging.Write(Colors.OrangeRed, "-- A Rogue CombatRoutine --");
            Logging.Write(Colors.White, "");
            Logging.Write(Colors.OrangeRed, "----For AoE you need to enable Blade Flurry manually---");
            Logging.Write(Colors.White, "");
            Logging.Write(Colors.OrangeRed, "--Hotkeys: Alt + E for AoE (basically use crimson tempest)--");
            Logging.Write(Colors.OrangeRed, "--Hotkeys: Alt + S for Manual Mode (Pauses 95% of DPS rotation)--");
            Logging.Write(Colors.OrangeRed, "------- Feint and Poisons keep being cast ---------");
            Logging.Write(Colors.OrangeRed, "--Hotkeys: Alt + F for Feint usage)--");
            Logging.Write(Colors.OrangeRed, "--Hotkeys: Alt + Q for cooldown usage--");
            Logging.Write(Colors.OrangeRed, "--Hotkeys: Control + Q To Enable/Disable Killing Spree--");
            Logging.Write(Colors.OrangeRed, "--Hotkeys: Control + NumPad0 To Enable/Disable Vanish and Preperation usage--");
            Logging.Write(Colors.OrangeRed, "--Hotkeys: Control + NumPad1 To Enable/Disable Self Healing--");
            Logging.Write(Colors.OrangeRed, "--Hotkeys: Control + NumPad1 To Enable/Disable out of combat Ambush opener--");
            Logging.Write(Colors.OrangeRed, "--Remember NumLock must be on--");
            Logging.Write(Colors.White, "");
            Logging.Write(Colors.OrangeRed, "Talents supported");
            Logging.Write(Colors.White, "All Tier 1,Deadly Throw,Leeching Poison, All Tier 6, Venom Rush, Death from Above");
            HKM.registerHotKeys();
            TM.Init();           
        }
        public override bool WantButton { get { return true; } }
        public override void OnButtonPress() { Logging.Write(Colors.OrangeRed, "Coming soon!"); }
        public override void ShutDown() { HKM.removeHotkeys(); }
        #endregion 

        #region [Method] - Pulse

        public override void Pulse()
        {
            if (!StyxWoW.IsInWorld || Me == null || !Me.IsValid || !Me.IsAlive)
                return;
            if (!Me.Combat)
                return;
            U.Cache();
            U.enemyAnnex(30);
            TM.Pulse();

        }
        #endregion  
        #endregion

    }
}
